From 13ed29b377abf4c430b879f363c8b084362e3d66 Mon Sep 17 00:00:00 2001 From: robertlipe Date: Sun, 15 Sep 2013 21:51:42 +0000 Subject: [PATCH] Preserve note for future possibilities of strip_html. --- gpsbabel/osm.cc | 2 +- gpsbabel/util.cc | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gpsbabel/osm.cc b/gpsbabel/osm.cc index d6d23068d..92c374015 100644 --- a/gpsbabel/osm.cc +++ b/gpsbabel/osm.cc @@ -461,7 +461,7 @@ osm_strip_html(const char* str) utf.is_html = 1; utf.utfstring = (char*)str; - return strip_html(&utf); // util.c + return strip_html(&utf); // util.cc } diff --git a/gpsbabel/util.cc b/gpsbabel/util.cc index d78f59869..0059ee54c 100644 --- a/gpsbabel/util.cc +++ b/gpsbabel/util.cc @@ -1490,6 +1490,14 @@ strip_nastyhtml(const QString& in) char* strip_html(const utf_string* in) { +#if 0 + // If we were willing to link core against QtGui (not out of the question) + // we could just do...and either decide whether to add handling for [IMG] + // or just say we don't do that any more. + QTextDocument doc; + doc.setHtml( in->utfstring ); + return xstrdup(CSTR(doc.toPlainText().simplified())); +#else char* outstring, *out; char* incopy, *instr; char tag[8]; @@ -1569,6 +1577,7 @@ strip_html(const utf_string* in) xfree(incopy); } return (outstring); +#endif } typedef struct { -- 2.30.2